class CameraControl extends paper.Behaviour {
	private _cam: egret3d.Camera;
	public posStart: egret3d.Vector3 = new egret3d.Vector3(0, 0, 0);
	public posEnd: egret3d.Vector3 = new egret3d.Vector3(0, 0, 0);
	public isOver: boolean = true;
	public selectId: string = "";
	private speed = 3;
	public light: paper.GameObject;

	onAwake() {
		this._cam = this.gameObject.getComponent(egret3d.Camera);
		this.selectId = "";
	}

	onUpdate(dt) {
		if (!this.isOver) {
			this.transform.position = this.transform.position.lerp(this.posEnd, this.speed * dt);
			if (egret3d.Vector3.getDistance(this.transform.position, this.posEnd) < 0.3) {
				this.isOver = true;
				this.transform.position = this.posEnd;
				if (this.selectId) {

				}
			}
		}
		if (this.light) {
			this.light.transform.position = this.transform.position;
			this.light.transform.rotation = this.transform.rotation;
		}
	}
}